const Mock = require('mockjs')

const data = Mock.mock({
  'items|30': [{
    id: '@id',
    orderNo: '@integer(1000000000000000, 5000000000000000)',
    orderTotal: '@integer(1, 5000)',
    paymentFeeAmount: '@integer(1, 5000)',
    'paymentMethod|1': ['支付宝', '微信'],
    'refundStatus|1': ['', '退款中', '已退款'],
    'orderStatus|1': ['新订单', '付款', '付款失败', '已付款', '发货中', '已发货', '交易成功', '交易取消']
  }]
})

module.exports = [
  {
    url: '/vue-admin-template/order/list',
    type: 'get',
    response: config => {
      const items = data.items
      return {
        code: 200,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
